/* 
 *      Webwidget - Passaparola Academy
 */



function sharePassaparola() {
    var s = document.createElement('script');
    s.async = true;
    s.src = "http://staging-passaparola-academy.corriere.it/community/webwidget/passaparolaShareBox.js";
    var where = document.getElementById("passaparola-share-box");
    
    if(where) {
        where.parentNode.insertBefore(s,where);
    }
}



function userPassaparola() {
    var s = document.createElement('script');
    s.async = true;
    s.src = 'http://staging-passaparola-academy.corriere.it/community/webwidget/passaparolaUserBox.js';
    var where = document.getElementById("passaparola-user-box");
    
    if(where) {
        where.parentNode.insertBefore(s,where);
    }
}

function tagPassaparola() {
    var s = document.createElement('script');
    s.async = true;
    s.src = 'http://staging-passaparola-academy.corriere.it/community/webwidget/passaparolaTagBox.js';
    var where = document.getElementById("passaparola-tag-box");
    
    if(where) {
        where.parentNode.insertBefore(s,where);
    }
}
    

function ratingPassaparola() {
    var s = document.createElement('script');
    s.async = true;
    s.src = 'http://staging-passaparola-academy.corriere.it/community/webwidget/passaparolaRatingBox.js';
    var where = document.getElementById("passaparola-rating-box");
    
    if(where) {
        where.parentNode.insertBefore(s,where);
    }
}
    
/***************************************************************************************************************************/
/***************************************************************************************************************************/

//                                    DOCUMENT READY

/***************************************************************************************************************************/
/***************************************************************************************************************************/


$(document).ready(function(){

   sharePassaparola() ;
   userPassaparola() ; 
   tagPassaparola() ;
   ratingPassaparola() ;

}); /*---- END document ready ----*/